package com.heartunderblade.rpc.config;

import com.heartunderblade.rpc.constant.SerializerKeys;
import com.heartunderblade.rpc.loadbalancer.LoadBalancerKeys;
import com.heartunderblade.rpc.retry.RetryStrategyKeys;
import com.heartunderblade.rpc.tolerant.TolerantStrategyKeys;
import lombok.Data;

@Data
public class RpcConfig {
    /**
     * 名称
     */
    private String name = "Kissshot-Acerolaorion-HeartunderBlade";


    /**
     * 版本号
     */
    private String version = "1.0";
    /**
     * 主机号
     */
    private String host = "localhost";
    /**
     * 端口号
     */
    private Integer serverPort = 8090;

    /**
     * 模拟调用
     */
    private boolean mock = false;
    /**
     * 默认序列方式为jdk
     */
    private String serializer = SerializerKeys.JDK;
    /**
     * 注册中心配置
     */
    private RegistryConfig registryConfig = new RegistryConfig();
    /**
     * 负载均衡配置
     */
    private String loadBalancer = LoadBalancerKeys.ROUND_ROBIN;
    /**
     * 重试策略配置
     */
    private String retryStrategy = RetryStrategyKeys.NO;
    /**
     * 容错策略配置
     */
    private String tolerantStrategy = TolerantStrategyKeys.FAIL_FAST;


}
